Skip to content

test(node): Batch Vercel AI integration scenarios - #26486

Closed
nicohrubec wants to merge 1 commit into
feat/batch-integration-runnerfrom
feat/batch-integration-vercel-ai
Closed

nicohrubec wants to merge 1 commit into
feat/batch-integration-runnerfrom
feat/batch-integration-vercel-ai

Conversation

@nicohrubec

@nicohrubec nicohrubec commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

What

Share processes across compatible Vercel AI scenarios within the generation and streaming suites.

Why

Each short AI scenario previously started the SDK and fixture application again. Run compatible scenarios together while retaining the version, recording-setting and module-format boundaries and the separate assertion cases.

Depends on #26493.

Current-develop benchmark (Nov 20; single runs). Times are the slowest integration test step across six shards, excluding setup and queues.

Runtime Baseline This PR Saved
Node 22 2:26 2:13 0:13
Node 24 2:03 2:09 −0:06
Node 26 1:59 1:51 0:08
Node 27 alpha 2:02 1:48 0:14
Bun 1.3.14 1:57 2:01 −0:04
Bun 1.4 1:53 3:57 −2:04
Bun canary 3:24 2:53 0:31

Baseline: shared runner only → this PR. Each provider PR is measured independently. Small differences include run-to-run variation; these are shard timings, not full-CI savings. Node 20 is excluded because the baseline Mistral abort/timeout test failed its 15-second timeout.

Bun 1.4 was slower in unchanged shard 3 (1:53 → 3:57); the changed Vercel suites run in shard 5.

@nicohrubec
nicohrubec force-pushed the feat/batch-integration-vercel-ai branch from f64550f to 9873ee1 Compare November 17, 2026 14:19
@nicohrubec
nicohrubec force-pushed the feat/benchmark-batch-node-scenarios branch from 899b943 to 8b9805b Compare November 17, 2026 14:19
@nicohrubec
nicohrubec force-pushed the feat/batch-integration-vercel-ai branch from 9873ee1 to 08325ff Compare November 17, 2026 14:22
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: e87929b (PR test merge using feat/batch-integration-runner at 97918c6)

Against: ef89ae2 (feat/batch-integration-runner) · base run #67338

⚠️ Baseline mismatch: 1 feat/batch-integration-runner commit(s) in the PR build are missing from the baseline. Their size changes also affect this comparison. Compare commits. Re-run once feat/batch-integration-runner's baseline build for 97918c6 finishes.

Path Size % Change Change
@sentry/browser 30.23 kB - -
@sentry/browser - with treeshaking flags 28.43 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.33 kB - -
@sentry/browser (incl. Tracing) 52.81 kB - -
@sentry/browser (incl. Tracing Core) 40.33 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.81 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.69 kB - -
@sentry/browser (incl. Tracing, Replay) 92.88 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.7 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 97.22 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 110.8 kB - -
@sentry/browser (incl. Feedback) 48.17 kB - -
@sentry/browser (incl. sendFeedback) 30.81 kB - -
@sentry/browser (incl. FeedbackAsync) 35.84 kB - -
@sentry/browser (incl. Metrics) 31.55 kB - -
@sentry/browser (incl. Logs) 31.83 kB - -
@sentry/browser (incl. Metrics & Logs) 32.49 kB - -
@sentry/react 32.24 kB - -
@sentry/react (incl. Tracing) 55.45 kB - -
@sentry/vue 38.45 kB - -
@sentry/vue (incl. Tracing) 55.75 kB - -
@sentry/svelte 30.24 kB - -
@sentry/remix (Remix 3 client bundle) 58.46 kB - -
CDN Bundle 32.16 kB - -
CDN Bundle (incl. Tracing) 53.19 kB - -
CDN Bundle (incl. Logs, Metrics) 34.95 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 55.76 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 76.02 kB - -
CDN Bundle (incl. Tracing, Replay) 91.1 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.71 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.51 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.07 kB - -
CDN Bundle - uncompressed 93.91 kB - -
CDN Bundle (incl. Tracing) - uncompressed 157.26 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 102.24 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 164.88 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 232.48 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 277.53 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 285.16 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 289.46 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 297.08 kB - -
@sentry/nextjs (client) 59.15 kB - -
@sentry/sveltekit (client) 54.06 kB - -
@sentry/core/server 45.28 kB - -
@sentry/core/browser 14.41 kB - -
@sentry/node 154.01 kB -0.01% -7 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.33 kB - -
@sentry/node - without tracing 88.81 kB - -
@sentry/node - without channel injection 142.98 kB -0.01% -6 B 🔽
@sentry/aws-serverless 99.4 kB -0.01% -4 B 🔽
@sentry/cloudflare (withSentry) - minified 208.5 kB - -
@sentry/cloudflare (withSentry) 483.88 kB - -
@sentry/cloudflare (withSentry, instrumented CommonJS package) - minified 1.02 MB - -
@sentry/nextjs/cloudflare (withSentry) - minified 233.74 kB - -

View base workflow run

@nicohrubec
nicohrubec changed the base branch from feat/benchmark-batch-node-scenarios to feat/batch-integration-runner November 17, 2026 14:26
@nicohrubec
nicohrubec force-pushed the feat/batch-integration-vercel-ai branch from 08325ff to 7ed9907 Compare November 17, 2026 14:27

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

runner.collectStreamedSpansUntilSegment(
span => span.name === 'main' && span.attributes['test.scenario']?.value === name,
),
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Span collectors can miss child spans

Medium Severity

Batched generation and streaming tests wait with collectStreamedSpansUntilSegment, which resolves as soon as the matching main segment arrives. Child gen_ai spans that land in a later envelope are dropped, so later assertions on generate_content, tools, and usage can flake depending on flush order.

Additional Locations (1)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit a11ee99. Configure here.

Co-Authored-By: OpenAI Codex <codex@openai.com>
@nicohrubec
nicohrubec force-pushed the feat/batch-integration-vercel-ai branch from a11ee99 to 90da2ec Compare November 20, 2026 19:02
@nicohrubec
nicohrubec force-pushed the feat/batch-integration-runner branch from 16e37e1 to 97918c6 Compare November 20, 2026 19:02

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 90da2ec. Configure here.

);
expect(generateContentSpans).toHaveLength(3);

const toolSpan = spans.find(span => span.attributes[SENTRY_OP]?.value === 'gen_ai.execute_tool');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests use string-literal span ops

Low Severity

This file already imports GEN_AI_INVOKE_AGENT and GEN_AI_GENERATE_CONTENT from @sentry/conventions/op, but new and moved assertions still compare SENTRY_OP to string literals such as 'gen_ai.invoke_agent', 'gen_ai.generate_content', and 'gen_ai.execute_tool'. This was flagged because the review rules require integration tests in files that already import @sentry/conventions/op to use those constants for span ops.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 90da2ec. Configure here.

@nicohrubec nicohrubec closed this Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant